﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PopupHandOverCheck.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.Popup.PopupHandOverCheck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <base target="_parent" />
    <meta http-equiv="pragram" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache, must-revalidate" />
    <meta http-equiv="expires" content="0">
    <title>Hand Over Check</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <script src="../../jQuery/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function setValue() {
            var handOver = document.getElementById("<%=this.txtHandoverCheckDetail.ClientID %>").value;
            if (jQuery.trim(handOver) == "" || jQuery.trim(handOver) == null) {
                alert('<%=this.GetMessage("SOM_HandOverNotBeEmpty")%>');
                return;
            }
            handOver = handOver.replace(/(<br>)/g, "\r\n");
            // edit by dylan 20150826 for u168.8
            var handOverCheck = document.getElementById("<%=this.chkHandoverCheck.ClientID %>").checked.toString().toUpperCase() == "TRUE" ? "1" : "0";
            window.returnValue = handOver + handOverCheck;
            window.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 400px; height: 300px">
        <tr>
            <td>
                <asp:Label ID="lblHandoverCheck" runat="server"></asp:Label>
                <asp:CheckBox ID="chkHandoverCheck" runat="server" />
            </td>
        </tr>
        <tr>
            <td style="float: right">
                <asp:TextBox ID="txtHandoverCheckDetail" runat="server" TextMode="MultiLine" Rows="9"
                    Width="380px" Height="230px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Button ID="btnSave" runat="server" Text="Save" OnClientClick="setValue();return true;"
                    OnClick="btnSave_Click" />&nbsp;
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="self.close();return false;" />
                &nbsp;&nbsp;
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
